package com.explore.demo.service;

import com.explore.demo.DTO.SearchDTO;
import com.explore.demo.common.ServerResponse;
import com.explore.demo.pojo.Recruitment;
import com.baomidou.mybatisplus.extension.service.IService;
import com.google.gson.internal.$Gson$Preconditions;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author gaolainan
 * @since 2021-04-18
 */
public interface RecruitmentService extends IService<Recruitment> {
    /**
     * 创建一个招聘的信息
     * @param recruitment
     * @param request
     * @return
     */
    public ServerResponse addRecruitment(Recruitment recruitment, HttpServletRequest request);

    /**
     * 通过招聘信息的标题 删除招聘信息
     * @param title
     * @return
     */
    public ServerResponse deleteByTitle(Integer title);

    /**
     * 查询全部的招聘信息
     * @return
     */
    public ServerResponse queryAll();

    /**
     * 通过招聘信息的标题 查询招聘信息的内容
     * @param title
     * @return
     */
    public ServerResponse queryByTitle(String title);

    /**
     * 根据帖子的id 查询对应的帖子信息
     * @param recruitmentId
     * @param request
     * @return
     */
    public ServerResponse queryByRecruitmentId(Integer recruitmentId, HttpServletRequest request);

    /**
     * 更新招聘信息的内容
     * @param recruitment
     * @return
     */
    public ServerResponse updateRecruitment(Recruitment recruitment);

    /**
     * 通过对应的searchVO 模糊查询
     * @param searchDTO
     * @return
     */
    public ServerResponse queryAllBySearchVO(SearchDTO searchDTO);

    /**
     * 创建一个新的职位
     * @param recruitment
     * @param recruitCategory
     * @param welfareCategory
     * @param request
     * @return
     */
    public ServerResponse createRecruitment(Recruitment recruitment, List<String> recruitCategory, List<String> welfareCategory, HttpServletRequest request);
}
